// --------------------------------------------------------------------
//   name 	: 
//   desc 	: 
//   version 	: 
//   dev 	: 
// --------------------------------------------------------------------
// DEPENDENCIES
// 
// --------------------------------------------------------------------
// CHANGE HISTORY
// 0.1 	Initial Release
// --------------------------------------------------------------------
	plugins.removeAds = { // Remove the ads
		'enhance_staemme' : function() {
		// Grab the frameset object
			var frmset = $("frameset");
		// Parse through it if there's more than 0
			if(frmset.length > 0) {
		        // Look and loop till we drop or run out of frames
				for(kk=0; kk<frmset[0].childNodes.length; kk++) {
					var frm = frmset[0].childNodes[kk];
		                // If we find the frame we're looking for we set it to a blank page, we hate ads
					if(frm.tagName=="FRAME" && frm.getAttribute("name") != "main") { frm.src = "about:blank"; }
				}
		        // Now that it's a blank page it's only taking up useless screen real-estate, set it to 0 width or height
				if (frmset[0].getAttribute("rows")) { frmset[0].setAttribute("rows", "0, *"); } else { frmset[0].setAttribute("cols", "*, 0"); }
		        // Remove ads timer that sets new ads when these have shown for X time
				setFunc("reload", function(ad_top, ad_sky){ });
		        // No need to go any further; this must be the top page
				return;
			}
		// Grab the iframes
			var adframes = $("iframe");
			for (i = 0; i < adframes.length; i++) {
				adframes[i].src = 'about:blank';
			}
			var posts = $("div");
			for (i = 0; i < posts.length; i++) {
				if (posts[i].innerHTML.match(/<iframe/,"gi") !== null) {
					posts[i].style.display = "none";
				}
			}
		// Remove ads timer
			setFunc("reload", function(src_ad){});
		},


// --------------------------------------------------------------------
// Function : 
// --------------------------------------------------------------------
  'enhance_forum' : function() {
		// Grab the frameset object
	  var frmset = $("frameset");
		// Parse through it if there's more than 0
	  if(frmset.length > 0) {
		        // Look and loop till we drop or run out of frames
		  for(kk=0; kk<frmset[0].childNodes.length; kk++) {
			  var frm = frmset[0].childNodes[kk];
		                // If we find the frame we're looking for we set it to a blank page, we hate ads
			  if(frm.tagName=="FRAME" && frm.getAttribute("name") != "main") { frm.src = "about:blank"; }
		  }
		        // Now that it's a blank page it's only taking up useless screen real-estate, set it to 0 width or height
		  if (frmset[0].getAttribute("rows")) { frmset[0].setAttribute("rows", "0, *"); } else { frmset[0].setAttribute("cols", "*, 0"); }
		        // Remove ads timer that sets new ads when these have shown for X time
		  setFunc("reload", function(ad_top, ad_sky){ });
		        // No need to go any further; this must be the top page
		  return;
	  }
		// Grab the iframes
	  var adframes = $("iframe");
	  for (i = 0; i < adframes.length; i++) {
		  adframes[i].src = 'about:blank';
	  }
	  var posts = $("div");
	  for (i = 0; i < posts.length; i++) {
		  if (posts[i].innerHTML.match(/<iframe/,"gi") !== null) {
			  posts[i].style.display = "none";
		  }
	  }
		// Remove ads timer
	  setFunc("reload", function(src_ad){});
  },
  'info' : {
	  'mandatory' : false,
   'name' : "Remove Ads",
   'desc' : "Remove the advertisements in the game. If (re)enabled it will require a restart to work on the overall page.",
   'version' : "0.1",
   'dev' : "Timas"
  }

	};